// import { reactive, toRefs } from '@vue/reactivity'
// import { onMounted } from '@vue/runtime-core'
/**
 * compositionAPI 组合式api:
 * 主要作用可以定义公用模块，提供代码的服用行，做到代码的抽离
 */
import { reactive, toRefs, onMounted } from 'vue'

export function useMarket() {
	const data = reactive({
		count: 1,
		name: 'seafwg'
	})
	let timer = null
	onMounted(() => {
		console.log("aa", data.count)
		setInterval(() => {
			data.count *= 8
		}, 1000)
	})

	return toRefs(data)
}